package com.xinsoft.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinsoft.entity.dto.ScmStockMoveParam;
import com.xinsoft.entity.po.ScmStockMove;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinsoft.entity.vo.ScmStockMovePageVo;
import com.xinsoft.entity.vo.ScmStockMoveVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 13370
* @description 针对表【scm_stock_move(库存调拨表)】的数据库操作Mapper
* @createDate 2023-08-17 09:51:59
* @Entity com.xinsoft.entity.po.ScmStockMove
*/
public interface ScmStockMoveMapper extends BaseMapper<ScmStockMove> {

    List<ScmStockMovePageVo> findPageListByParam(@Param("param") ScmStockMoveParam param);

    IPage<ScmStockMovePageVo> findPageListByParam(Page<ScmStockMovePageVo> page, @Param("param") ScmStockMoveParam param);

    ScmStockMoveVo getDetail(@Param("id") Integer id);

    /**
     * 获取被调拨入库引用的数量
     * @param id 库存调拨id
     * @return int
     */
    int getMoveInstockCiteCount(Integer id);

    /**
     * 获取被调拨出库引用的数量
     * @param id 库存调拨id
     * @return int
     */
    int getMoveOutstockCiteCount(Integer id);
}




